Using Contract Hour in CygNet Measurement
Contract hour is a dynamic property defined as an offset (in hours) from Device time. It applies to device Nodes and to physical Station Group Nodes (Nodes containing devices) from which data can be requested. Contract hour defines when the "contract day" begins and ends, and determines the "Contract time" displayed in FMS controls when Contract time format is selected for data viewing.
Raw data comes into the system in Device time (D). Contract hour is a device configuration parameter (for most devices) used to establish the Contract day and Contract time (C).
- Data request parameters in FMS are based on contract days (C). Contract hour values must be known prior to executing data requests.
- Data is displayed in FMS Explorer based on contract days, assuming a contract hour of zero (0). The time format in which you view the data, however, can be selected in the Options pane of controls that display data for one Node at a time (Exceptions, Configuration, History Grid, Alarm, and Raw Data). Controls that allow selection of multiple Nodes (Dashboard, History Graph, Close Period, and Balance) always display data in Contract time (C).
Notes:
The PPA control always displays data in Local time (L), but you still have the option to view start/end dates in a selected time format.
The Reports control always displays data in Device time (D).
- When you change the contract hour on a device, the contract hour in the FMS device properties must also be changed, so that the contract hour is consistent between FMS and the device(s) being polled. See Viewing and Editing Node Properties for more information.
- Contract hour changes are applied to the end of the contract day, to redefine the beginning of the next contract day.
- Validation rules can be set up to help you monitor contract hour changes in your system.
Note: To allow physical Station Group Nodes to roll up successfully, make sure that the contract hour value for the physical Station Group Node is equal to the contract hour value for each of its member Nodes.
Executing Data Requests
Request current configuration prior to executing data requests against Nodes, since contract hour is a necessary configuration parameter. In FMS data requests, command parameters for date are based on contract days (C). The contract hour must be known prior to requesting data from devices, which provide data in Device time (D), in order to establish consistent data timestamps.
Note: When polling daily devices with contract hour changes, be aware of the times of scheduled command tasks. If you are moving the contract hour back (earlier), make sure that you do not execute commands for the time period between the old and new contract hour.
Changing Contract Hour
Changing contract hour in FMS is a manual process that must occur whenever device contract hour changes. Edits to contract hour are made on the Time page of the property sheet for Gas Meter, Chromatograph, Liquid Device, or Station Group Nodes. See Viewing and Editing Node Properties for more information.
In general, contract hour can only be changed prior to retrieving data. If data exists past the time to which you desire to change the contract hour, the change cannot be made. The only exception to this is if you must change contract hour for a daily gas metering device, as described in the Exception section below.
Note: Do not execute configuration polls around the time of the contract hour update; wait until all devices and FMS Node properties have been successfully updated. Even if a user creates a new configuration record with the correct offset, a configuration poll that brings back the wrong offset would supersede the user-created record, and could potentially cause problems.
When you change the contract hour for a Node, pressing OK causes the Save FMS Record dialog box to appear, where you can enter record change effective dates and audit information. Make sure that you select an accurate Change begin date for the new contract hour.
Warning: Set the Change begin date with care. Leaving the Change begin date as "Indefinite" (the default) would overwrite all previously set contract hour values for the Node.
If no user edit is executed for a contract hour change, when polling by Contract time (C), the following polling issues could occur.
- If all devices affected by the contract hour change are not updated within the appropriate time window (before the next contract day begins) incorrect data would be retrieved.
- If data recorded after the contract hour change occurs is requested before the change is received by FMS, incorrect data would be retrieved.
Record Timestamps
Records for hourly devices are timestamped each hour, whereas records for daily devices are timestamped at the start of each contract day. For devices with contract hour values other than 0, the timestamp will be based on that contract hour value, instead of the 00:00:00 (midnight) default. Each contract hour change will result in device data appearing to contain either a "lean" day, with fewer than 24 hours, or a day ending with a "fat" hour.
Fat Hours
When the contract hour is increased (made later than the current contract hour), it creates a contract day with more than 24 hours of data. When this occurs, all extra hours are rolled into the 24th hour. Therefore a contract day with more than 24 hours of data would appear to have a "fat" 24th hour containing the additional data.
Note: This is only an issue when viewing data in Contract time (C). When viewing data in Device time (D), each record will have the original timestamp.
Exception for Contract Hour Changes
There is an exception to the ability to change contract hour values only before data collection.
For periodic Gas Meter Nodes with "Daily" record spans, it is possible although not recommended to change the contract hour after records have been collected for the affected time span.
In such cases where data exists past the point in time for which you wish the contract hour change to be effective, all history must first be purged back to the intended contract hour change date and time and then, after the contract hour change, data must be recollected for the purged time period, as follows.
To Change Contract Hour for Daily Gas Meter Devices with Existing Records in the Affected Time Span
- Review the Purging Device Data topic for information about the Purge Data command.
- Determine exactly which Node(s) will be affected by the contract hour change.
- Establish the desired effective date and time for the intended contract hour change, in Device time (D).
- Use the Purge Data command on the Administrative menu to purge all categories of data simultaneously.
Note: Purged data will be irretrievably removed from the CygNet Measurement system, so make all selections carefully.
- Select the Node(s) that will be affected, from the Node list.
- Enter a Purge begin date value for the desired effective contract hour change date/time, in Device time (D).
Notes:
For hourly devices, make sure you select Purge begin date values to encompass the full hour containing the beginning of the data you want to purge.
For daily devices, make sure you select Purge begin date values to encompass the full day containing the data you want to purge, by setting the time equal to 00:00:00.
- It is recommended that the Purge all records beyond begin date check box remains selected.
- Optionally (not recommended) clear the Purge all records beyond begin date check box and enter a Purge end date value for the desired ending contract hour change date/time, in Device time (D).
Notes:
For hourly devices, make sure you select Purge end date values to encompass the full hour containing the end of the data you want to purge.
For daily devices, make sure you select Purge end date values to encompass the full day containing the data you want to purge, by setting the time equal to 12:00:00.
- Select check boxes to include all three types of Records to purge - it is essential they must all be selected simultaneously, in the same action:
- Alarm
- Configuration, event, and gas analysis
- Periodic history
- Review your entries and then Purge the data back to the intended effective date of the changed contract hour.
- Change the contract hour property in the Node Properties. For each affected device, manually change the contract hour to the new value. Make sure that the contract hour value at the device agrees with the updated contract hour value you are editing in the Node properties. See Viewing and Editing CygNet Measurement Node Properties for more information.
- Poll the affected device(s) for data. Use the Request New Data command to poll for data, starting from the date of the contract hour change. Do not use the Request Missing Data command for this purpose. See Running Node Commands for more information.
Monitoring Changes to Contract Hour
If desired, you can create a validation rule to help you monitor changes made to device configuration contract hour values. Setting up a configuration data validation rule for Config Change (Contract Hour) will cause an exception when a poll for configuration or events is executed after the contract hour change occurs. The exceptions generated can be viewed on the Exceptions control in FMS Explorer.
See Managing Validation Engines for more information.


